/**
 * 
 */
package cs236369.webserver;

import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;

/**
 * Interface for configuration reader
 *
 */
public interface IWebServerConfig {
	/**
	 * @return A string represents base directory for server files as 
	 *         an absolute path in the file system
	 */
	public String getBaseDirectory();
	
	/**
	 * @return The port number that the server listens
	 */
	public int getPort();
	
	/**
	 * @return The number of socket-reader threads
	 */
	public int getNumSocketReaders();
	
	/**
	 * @return The number of socket-reader threads
	 */
	public int getNumRequestHandlers();
	
	/**
	 * @return The size of the socket queue
	 */
	public int getSocketQueueSize();
	
	/**
	 * @return The size of the request queue
	 */
	public int getRequestQueueSize();
	
	/**
	 * @return The different specific-type handlers
	 * @throws ClassNotFoundException 
	 * @throws NoSuchMethodException 
	 * @throws InvocationTargetException 
	 * @throws IllegalAccessException 
	 * @throws InstantiationException 
	 * @throws SecurityException 
	 * @throws IllegalArgumentException 
	 * @see TypeHandlerData for more details
	 */
	public HashMap<String, ITypeHandler> getTypeHandlers() 
	       throws IllegalArgumentException,
	              SecurityException,
	              InstantiationException,
	              IllegalAccessException, 
	              InvocationTargetException, 
	              NoSuchMethodException, 
	              ClassNotFoundException;
	
	/**
	 * @return The default welcome file that is used for responding
	 *         to requests for the root
	 */
	public String getWelcomeFile();
	
	/**
	 * @return A HashMap of mime-mappings, that maps the file extension to the mime-type
	 */
	public HashMap<String, String> getMimeMapping();
	
	
}
